<template>
      <div>
        <component :is="currentComponent"  :inboundOrderNo=inboundOrderNo :wmsInbound=editData @goNextStep="add" @goNextEdit="edit" @handleCancel="handleCancel" ref="childComponent" />
      </div>
</template>

<script>
import List from "./list"
import AddWmsInbound from "./addWmsInbound"
import EditWmsInbound from "./editWmsInbound"

export default {
  name: "Index",
  components: {List,AddWmsInbound,EditWmsInbound},
  data() {
    return {
      currentComponent:"List",
      inboundOrderNo:"",
      editData:{},
    }
  },
  created() {
  },
  methods: {
    add(inboundOrderNo){
      this.inboundOrderNo=inboundOrderNo;
      this.currentComponent = "AddWmsInbound";
    },
    //修改
    edit(editData){
      this.editData=editData;
      this.currentComponent = "EditWmsInbound";
    },
    handleCancel(){
      this.currentComponent = "List"
    }
  }
}
</script>
<style>

</style>
